﻿<?php
require('./conn.php');

//判断post是否为空
if(empty($_POST)){
	require('./index.html');
}else{
	$sql = "insert into msg(name,email,content) values('$_POST[name]','$_POST[email]','$_POST[content]')";
	if(!mysql_query($sql)){
		echo mysql_error();
		exit;
	}else{
		echo '留言成功';
	}
}
?>
